import request from "../utils/request";
/**
 *  购物车接口
 * @param {*} goodsId 
 * @returns 
 */

// 添加商品到购物车
export const reqAddCart = (goodsId, count) => request({
    url: `/mall-api/cart/addToCart/${goodsId}/${count}`,
})

// 删除购物车信息
export const reqDeleteCart = (goodsId) => request({
    url: `/mall-api/cart/delete/${goodsId}`,
})


// 获取购物车列表
export const reqCartList = () => request({
    url: '/mall-api/cart/getCartList'
})

// 选中与取消选中购物车商品
export const reqCheckCart = (goodsId, isChecked) => request({
    url: `/mall-api/cart/checkCart/${goodsId}/${isChecked}`,
})

